#启动，重启，关闭
from appium import webdriver
from appium.webdriver.common.mobileby import MobileBy

from page.basepage import BasePage
from page.index_page import IndexPage


class App(BasePage):

    def restart(self):
        self.driver.close_app()
        self.driver.launch_app()

    def stop(self):
        self.driver.quit()

    def goto_to_main(self):
        self.steps("app.yaml","goto_to_main")
        return IndexPage(self.driver)